package daemonset

import (
	"kms-backend/controllers/daemonset"

	"github.com/gin-gonic/gin"
)

// 新增
func create(daemonsetGroup *gin.RouterGroup) {
	daemonsetGroup.POST("/create", daemonset.Create)
}

// 更新
func update(daemonsetGroup *gin.RouterGroup) {
	daemonsetGroup.POST("/update", daemonset.Update)
}

func detail(daemonsetGroup *gin.RouterGroup) {
	daemonsetGroup.GET("/detail", daemonset.Detail)
}

func list(daemonsetGroup *gin.RouterGroup) {
	daemonsetGroup.GET("/list", daemonset.List)
}

func delete(daemonsetGroup *gin.RouterGroup) {
	daemonsetGroup.POST("/delete", daemonset.Delete)
}

func RegisterSubRouter(g *gin.RouterGroup) {
	// 配置路由策略
	daemonsetGroup := g.Group("/daemonset")
	create(daemonsetGroup)
	update(daemonsetGroup)
	detail(daemonsetGroup)
	list(daemonsetGroup)
	delete(daemonsetGroup)

}
